﻿Imports ccapps.Web.page

Imports System.Data.OracleClient

Namespace persistent


    Public Class CustomerDetailsEditPersistent
        Private Shared ConnStr As String = GlobalVar.OraConnStr

        Private Shared dbPackageName As String = "EU_BILL.CustomerDetailsEdit."


        Public Shared Function GetIDTypeList() As DataTable

            Dim command As New OracleCommand(dbPackageName & "GetIDTypeList")
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function

        Public Shared Function GetSectorList() As DataTable

            Dim command As New OracleCommand(dbPackageName & "GetSectorList")
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function



        Public Shared Function GetNationality() As DataTable

            Dim command As New OracleCommand(dbPackageName & "GetNationality")
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function

        Public Shared Function GetLanguage() As DataTable

            Dim command As New OracleCommand(dbPackageName & "GetLanguage")
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function
        Public Shared Function GetCustInfoFromCustcode(ByVal pin_custcode As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "GetCustInfoFromCustcode")
            command.Parameters.Add("pin_custcode", OracleType.VarChar).Value = pin_custcode
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output

            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, pin_custcode, "null", "null", "null", "Select(GetCustInfoFromCustcode)", "CustomerDetails", gen.Session("user"))


            Return ExecuteDataTable(command)

        End Function

        Public Shared Function GetCustInfoFromMSISDN(ByVal pin_MSISDN As String) As DataTable
            Dim pin_MSISDN2 As String = "90" + pin_MSISDN

            Dim command As New OracleCommand(dbPackageName & "GetCustInfoFromMSISDN")
            command.Parameters.Add("pin_MSISDN", OracleType.VarChar).Value = pin_MSISDN2
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            'Dim Query As String = "Select * from dual "
            'Dim gen As Object = New CustomerDetails2()
            'persistent.myDBConn.ORAScalar_LOG(Query, "null", "null", "null", pin_MSISDN, "Select(GetCustInfoFromCustcode)", "CustomerDetails", gen.Session("user"))


            Return ExecuteDataTable(command)

        End Function


        Public Shared Function GetCustomerContactDetails(ByVal pin_customer_id As Integer) As DataTable

            Dim command As New OracleCommand(dbPackageName & "GetCustomerContactDetails")
            command.Parameters.Add("pin_customer_id", OracleType.VarChar).Value = pin_customer_id
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(GetCustomerContactDetails)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateTaxOffice(ByVal pin_customer_id As Integer, ByVal pin_taxOffice As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateTaxOffice")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_taxOffice", OracleType.VarChar).Value = pin_taxOffice
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output 'Customer ID Bilgisinin Databaseden Alınması 
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateTaxOffice)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)


        End Function

        Public Shared Function UpdateTaxNumber(ByVal pin_customer_id As Integer, ByVal pin_taxNumber As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateTaxNumber")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_taxNumber", OracleType.VarChar).Value = pin_taxNumber
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output 'Customer ID Bilgisinin Databaseden Alınması 
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateTaxNumber)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        'PROCEDURE UpdateTCNo2 (pin_customer_id IN Integer,pin_tcno In VarChar2,pin_custFname In VarChar2,pin_custName In VarChar2,pin_custLname In VarChar2,pin_fatherName In VarChar2,pin_maiden In VarChar2,pin_autBirthdate In VarChar2,pin_regProvince In VarChar2,pin_regDistrict In VarChar2,p_cursor OUT r_cursor_type)


        Public Shared Function UpdateTCNo2(ByVal pin_customer_id As Integer, ByVal pin_tcno As String, ByVal pin_custFname As String, ByVal pin_custLname As String, ByVal pin_fatherName As String, ByVal pin_maiden As String, ByVal pin_autBirthdate As String, ByVal pin_regProvince As String, ByVal pin_regDistrict As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateTCNo2")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_tcno", OracleType.VarChar).Value = pin_tcno
            command.Parameters.Add("pin_custFname", OracleType.VarChar).Value = pin_custFname
            command.Parameters.Add("pin_custLname", OracleType.VarChar).Value = pin_custLname
            command.Parameters.Add("pin_fatherName", OracleType.VarChar).Value = pin_fatherName
            command.Parameters.Add("pin_maiden", OracleType.VarChar).Value = pin_maiden
            command.Parameters.Add("pin_autBirthdate", OracleType.VarChar).Value = pin_autBirthdate
            command.Parameters.Add("pin_regProvince", OracleType.VarChar).Value = pin_regProvince
            command.Parameters.Add("pin_regDistrict", OracleType.VarChar).Value = pin_regDistrict
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output 'Customer ID Bilgisinin Databaseden Alınması 
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateTaxNumber)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateAuthorizedMSISDN(ByVal pin_customer_id As Integer, ByVal pin_autMsisdn As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateAuthorizedMSISDN")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_autMsisdn", OracleType.VarChar).Value = pin_autMsisdn
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output 'Customer ID Bilgisinin Databaseden Alınması 
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateAuthorizedMSISDN)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateAuthorizedEmail(ByVal pin_customer_id As Integer, ByVal pin_autEmail As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateAuthorizedEmail")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_autEmail", OracleType.VarChar).Value = pin_autEmail
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateAuthorizedEmail)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateTCNo(ByVal pin_customer_id As Integer, ByVal pin_tcno As String) As DataTable


            Dim command As New OracleCommand(dbPackageName & "UpdateTCNo")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_tcno", OracleType.VarChar).Value = pin_tcno
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateTCNo)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateIdentificationTypeAndNo(ByVal pin_customer_id As Integer, ByVal pin_idenNo As String, ByVal pin_idenType As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateIdentificationTypeAndNo")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_idenNo", OracleType.VarChar).Value = pin_idenNo
            command.Parameters.Add("pin_idenType", OracleType.VarChar).Value = pin_idenType
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateIdentificationTypeAndNo)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateAuthorizedBirthdate(ByVal pin_customer_id As Integer, ByVal pin_autBirthdate As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateAuthorizedBirthdate")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_autBirthdate", OracleType.VarChar).Value = pin_autBirthdate
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateAuthorizedBirthdate)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateAuthorizedFather(ByVal pin_customer_id As Integer, ByVal pin_autFather As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateAuthorizedFather")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_autFather", OracleType.VarChar).Value = pin_autFather
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateAuthorizedFather)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function


        Public Shared Function UpdateSector(ByVal pin_customer_id As Integer, ByVal pin_sector As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateSector")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_sector", OracleType.VarChar).Value = pin_sector
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateSector)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateDeactivateOverdisc(ByVal pin_customer_id As Integer, ByVal pin_deactivateOverdiscounting As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateDeactivateOverdisc")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_deactivateOverdisc", OracleType.VarChar).Value = pin_deactivateOverdiscounting
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateDeactivateOverdisc)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateLimitAltiFatura(ByVal pin_customer_id As Integer, ByVal pin_limitAlti As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateLimitAltiFatura")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_limitAlti", OracleType.VarChar).Value = pin_limitAlti
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateLimitAltiFatura)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateRehbereKayit(ByVal pin_customer_id As Integer, ByVal pin_rehber As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateRehbereKayit")
            command.Parameters.Add("pin_rehber", OracleType.VarChar).Value = pin_rehber
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateRehbereKayit)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function


        Public Shared Function UpdateCustomerName(ByVal pin_customer_id As Integer, ByVal pin_custName As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerName")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_custName", OracleType.VarChar).Value = pin_custName
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerName)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerFirstName(ByVal pin_customer_id As Integer, ByVal pin_custFname As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerFirstName")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_custFname", OracleType.VarChar).Value = pin_custFname
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerFirstName)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function


        Public Shared Function UpdateCustomerLastName(ByVal pin_customer_id As Integer, ByVal pin_custLname As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerLastName")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_custLname", OracleType.VarChar).Value = pin_custLname
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerLastName)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerStreet(ByVal pin_customer_id As Integer, ByVal pin_street As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerStreet")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_street", OracleType.VarChar).Value = pin_street
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerStreet)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerStreetNo(ByVal pin_customer_id As Integer, ByVal pin_streetNo As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerStreetNo")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_streetNo", OracleType.VarChar).Value = pin_streetNo
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerStreetNo)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerADR1(ByVal pin_customer_id As Integer, ByVal pin_adr1 As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerADR1")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_adr1", OracleType.VarChar).Value = pin_adr1
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerADR1)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerADR2(ByVal pin_customer_id As Integer, ByVal pin_adr2 As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerADR2")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_adr2", OracleType.VarChar).Value = pin_adr2
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerADR2)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerADR3(ByVal pin_customer_id As Integer, ByVal pin_adr1 As String, ByVal pin_adr2 As String, ByVal pin_adr3 As String, ByVal pin_street As String, ByVal pin_streetNo As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerADR3")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_adr1", OracleType.VarChar).Value = pin_adr1
            command.Parameters.Add("pin_adr2", OracleType.VarChar).Value = pin_adr2
            command.Parameters.Add("pin_adr3", OracleType.VarChar).Value = pin_adr3
            command.Parameters.Add("pin_street", OracleType.VarChar).Value = pin_street
            command.Parameters.Add("pin_streetNo", OracleType.VarChar).Value = pin_streetNo
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerADR3)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerZIP(ByVal pin_customer_id As Integer, ByVal pin_zip As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerZIP")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_zip", OracleType.VarChar).Value = pin_zip
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerZIP)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateCustomerCity(ByVal pin_customer_id As Integer, ByVal pin_city As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerCity")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_city", OracleType.VarChar).Value = pin_city
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerCity)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function UpdateContactPhone1(ByVal pin_customer_id As Integer, ByVal pin_contactPhoneArea As String, ByVal pin_contactPhone As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateContactPhone1")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_contactPhoneArea", OracleType.VarChar).Value = pin_contactPhoneArea
            command.Parameters.Add("pin_contactPhone", OracleType.VarChar).Value = pin_contactPhone
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateContactPhone1)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateContactPhone2(ByVal pin_customer_id As Integer, ByVal pin_contactPhoneArea As String, ByVal pin_contactPhone As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateContactPhone2")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_contactPhoneArea", OracleType.VarChar).Value = pin_contactPhoneArea
            command.Parameters.Add("pin_contactPhone", OracleType.VarChar).Value = pin_contactPhone
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateContactPhone2)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateFax(ByVal pin_customer_id As Integer, ByVal pin_FaxArea As String, ByVal pin_FaxNo As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateFax")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_FaxArea", OracleType.VarChar).Value = pin_FaxArea
            command.Parameters.Add("pin_Fax", OracleType.VarChar).Value = pin_FaxNo
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateFax)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateEmail(ByVal pin_customer_id As Integer, ByVal pin_email As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateEmail")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_email", OracleType.VarChar).Value = pin_email
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(pin_customer_id)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateSMSNo(ByVal pin_customer_id As Integer, ByVal pin_smsNo As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateSMSNo")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_smsNo", OracleType.VarChar).Value = pin_smsNo
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(pin_customer_id)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateCustomerGroup(ByVal pin_customer_id As Integer, ByVal pin_customerGroup As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerGroup")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_customerGroup", OracleType.VarChar).Value = pin_customerGroup
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerGroup)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateDriverLicence(ByVal pin_customer_id As Integer, ByVal pin_driverLicence As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateDriverLicence")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_driverLicence", OracleType.VarChar).Value = pin_driverLicence
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateDriverLicence)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateTaxRegistration(ByVal pin_customer_id As Integer, ByVal pin_taxno As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateTaxRegistration")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_taxno", OracleType.VarChar).Value = pin_taxno
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateTaxRegistration)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateCompanyRegistration(ByVal pin_customer_id As Integer, ByVal pin_company_reg_no As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCompanyRegistration")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_company_reg_no", OracleType.VarChar).Value = pin_company_reg_no
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCompanyRegistration)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateLanguage(ByVal pin_customer_id As Integer, ByVal pin_language As Integer) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateLanguage")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_languageCode", OracleType.Int32).Value = pin_language
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateLanguage)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateNationality(ByVal pin_customer_id As Integer, ByVal pin_national As Integer) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateNationality")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_national", OracleType.Int32).Value = pin_national
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateNationality)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateCustomerType(ByVal pin_customer_id As Integer, ByVal pin_custType As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCustomerType")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_custType", OracleType.VarChar).Value = pin_custType
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerType)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateDataLevel(ByVal pin_customer_id As Integer, ByVal pin_datalevel As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateDataLevel")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_datalevel", OracleType.VarChar).Value = pin_datalevel
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateDataLevel)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateFatherName(ByVal pin_customer_id As Integer, ByVal pin_fatherName As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateFatherName")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_fatherName", OracleType.VarChar).Value = pin_fatherName
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateFatherName)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateMotherName(ByVal pin_customer_id As Integer, ByVal pin_motherName As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateMotherName")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_motherName", OracleType.VarChar).Value = pin_motherName
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateMotherName)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateMotherMaiden(ByVal pin_customer_id As Integer, ByVal pin_maiden As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateMotherMaiden")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_maiden", OracleType.VarChar).Value = pin_maiden
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateMotherMaiden)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateRegistiredProvince(ByVal pin_customer_id As Integer, ByVal pin_regProvince As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateRegistiredProvince")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_regProvince", OracleType.VarChar).Value = pin_regProvince
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateRegistiredProvince)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateRegistiredDistrict(ByVal pin_customer_id As Integer, ByVal pin_regDistrict As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateRegistiredDistrict")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_regDistrict", OracleType.VarChar).Value = pin_regDistrict
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateRegistiredDistrict)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateBirthPlaceProvince(ByVal pin_customer_id As Integer, ByVal pin_birthProvince As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateBirthPlaceProvince")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_birthProvince", OracleType.VarChar).Value = pin_birthProvince
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateBirthPlaceProvince)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateBirthPlaceDistrict(ByVal pin_customer_id As Integer, ByVal pin_birthDistrict As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateBirthPlaceDistrict")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_birthDistrict", OracleType.VarChar).Value = pin_birthDistrict
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateBirthPlaceDistrict)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateDataShare(ByVal pin_customer_id As Integer, ByVal pin_dataShare As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateDataShare")
7:          command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_dataShare", OracleType.VarChar).Value = pin_dataShare
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateDataShare)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateEmployer(ByVal pin_customer_id As Integer, ByVal pin_employer As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateEmployer")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_employer", OracleType.VarChar).Value = pin_employer
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateEmployer)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function
        Public Shared Function UpdateEmployeeCompany(ByVal pin_customer_id As Integer, ByVal pin_employeeCompany As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateEmployeeCompany")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_employeeCompany", OracleType.VarChar).Value = pin_employeeCompany
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateEmployeeCompany)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function LAPrintInvoice(ByVal pin_customer_id As Integer, ByVal pin_control As Integer) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateLAPrintInvoice")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_control", OracleType.Int32).Value = pin_control
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output

            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateLAPrintInvoice)", "CustomerDetails", gen.Session("user"))


            Return ExecuteDataTable(command)

        End Function

        Public Shared Function CustomerTariffType(ByVal pin_customer_id As Integer) As DataTable

            Dim command As New OracleCommand(dbPackageName & "CustomerTariffType")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id 'Customer ID Bilgisinin Databaseden Alınması 
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output 'Customer ID Bilgisinin Databaseden Alınması 

            Return ExecuteDataTable(command)
        End Function

        Public Shared Function UpdateCompanyName(ByVal pin_customer_id As Integer, ByVal pin_company_name As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "UpdateCompanyName")
            command.Parameters.Add("pin_customer_id", OracleType.Int32).Value = pin_customer_id
            command.Parameters.Add("pin_ADR_NAME", OracleType.VarChar).Value = pin_company_name
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            ''LOGLAMA
            Dim Query As String = "Select * from dual "
            Dim gen As Object = New CustomerDetails2()
            persistent.myDBConn.ORAScalar_LOG(Query, "null", pin_customer_id, "null", "null", "Select(UpdateCustomerName)", "CustomerDetails", gen.Session("user"))

            Return ExecuteDataTable(command)

        End Function

        Public Shared Function IlceType(ByVal city_code As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "Autodistinct")
            command.Parameters.Add("city_code", OracleType.Int32).Value = city_code
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function

        Public Shared Function IlType() As DataTable

            Dim command As New OracleCommand(dbPackageName & "Autocity")
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function

        Public Shared Function Autocitycode(ByVal city_des As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "Autocitycode")
            command.Parameters.Add("pin_city_des", OracleType.VarChar).Value = city_des
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function

        Public Shared Function Autodistinctcode(ByVal DIST_DES As String) As DataTable

            Dim command As New OracleCommand(dbPackageName & "Autodistinctcode")
            command.Parameters.Add("pin_DIST_DES", OracleType.VarChar).Value = DIST_DES
            command.Parameters.Add("p_cursor", OracleType.Cursor).Direction = ParameterDirection.Output
            Return ExecuteDataTable(command)

        End Function

        Public Shared Function ExecuteNonQuery(ByVal command As OracleCommand, ByRef MESSAGE As String)
            Dim connection As New OracleConnection(ConnStr)
            command.Connection = connection
            command.CommandType = CommandType.StoredProcedure

            Try
                connection.Open()
                command.ExecuteNonQuery()
            Catch ex As Exception
                MESSAGE = ex.Message.ToString
            Finally
                connection.Close()
            End Try
        End Function
        Public Shared Function ExecuteDataTable(ByVal command As OracleCommand, Optional ByVal directSql As Boolean = 0) As DataTable
            Dim connection As New OracleConnection(ConnStr)
            Dim dataAdapter As New OracleDataAdapter(command)
            Dim dataTable As New DataTable
            Dim dataSet As New DataSet

            command.Connection = connection

            If Not (directSql) Then
                command.CommandType = CommandType.StoredProcedure
            End If

            Try
                connection.Open()
                dataAdapter.Fill(dataSet)
                dataTable = dataSet.Tables(0)
            Catch ex As Exception
            Finally
                connection.Close()
                dataSet.Dispose()
            End Try

            Return dataTable
        End Function




    End Class
End Namespace

